Optimal. Leaf size=26 \[ -\frac {a \tanh ^{-1}(\cos (c+d x))}{d}-\frac {b \cos (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {3093, 3855}
\begin {gather*} -\frac {a \tanh ^{-1}(\cos (c+d x))}{d}-\frac {b \cos (c+d x)}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3093
Rule 3855
Rubi steps
\begin {align*} \int \csc (c+d x) \left (a+b \sin ^2(c+d x)\right ) \, dx &=-\frac {b \cos (c+d x)}{d}+a \int \csc (c+d x) \, dx\\ &=-\frac {a \tanh ^{-1}(\cos (c+d x))}{d}-\frac {b \cos (c+d x)}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(63\) vs. \(2(26)=52\).
time = 0.02, size = 63, normalized size = 2.42 \begin {gather*} -\frac {b \cos (c) \cos (d x)}{d}-\frac {a \log \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )\right )}{d}+\frac {a \log \left (\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right )}{d}+\frac {b \sin (c) \sin (d x)}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.19, size = 33, normalized size = 1.27
method | result | size |
derivativedivides | \(\frac {a \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )-b \cos \left (d x +c \right )}{d}\) | \(33\) |
default | \(\frac {a \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )-b \cos \left (d x +c \right )}{d}\) | \(33\) |
risch | \(-\frac {b \,{\mathrm e}^{i \left (d x +c \right )}}{2 d}-\frac {b \,{\mathrm e}^{-i \left (d x +c \right )}}{2 d}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d}\) | \(67\) |
norman | \(\frac {\frac {2 b \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {2 b \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}+\frac {a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}\) | \(68\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 38, normalized size = 1.46 \begin {gather*} -\frac {2 \, b \cos \left (d x + c\right ) + a \log \left (\cos \left (d x + c\right ) + 1\right ) - a \log \left (\cos \left (d x + c\right ) - 1\right )}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.43, size = 42, normalized size = 1.62 \begin {gather*} -\frac {2 \, b \cos \left (d x + c\right ) + a \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - a \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \sin ^{2}{\left (c + d x \right )}\right ) \csc {\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 58 vs.
\(2 (26) = 52\).
time = 0.42, size = 58, normalized size = 2.23 \begin {gather*} \frac {a \log \left (\frac {{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right ) + \frac {4 \, b}{\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} - 1}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 13.37, size = 23, normalized size = 0.88 \begin {gather*} -\frac {b\,\cos \left (c+d\,x\right )+a\,\mathrm {atanh}\left (\cos \left (c+d\,x\right )\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________